using System.Windows.Media.Imaging;
using AndyPike.Experiments.Fluent.Events;

namespace AndyPike.Experiments.Fluent
{
    public abstract class FluentImageBase
    {
        protected WriteableBitmap image;

        public event ImageCommandEventHandler CommandStarted;
        public event ImageCommandEventHandler CommandCompleted;

        protected void OnCommandStarted(string commandName)
        {
            if (CommandStarted != null)
            {
                CommandStarted(this, new ImageCommandEventHandlerArgs(commandName));
            }
        }

        protected void OnCommandCompleted(string commandName)
        {
            if (CommandCompleted != null)
            {
                CommandCompleted(this, new ImageCommandEventHandlerArgs(commandName));
            }
        }
    }
}